import pandas as pd
import numpy as np

from tensorflow.keras import layers, models, optimizers, losses, metrics
from tensorflow.keras import utils

#加载鸢尾花数据
df1 = pd.read_csv('1.csv')
x = df1.iloc[:, 1:-1]
y = df1.iloc[:, -1:]

#提取模型
model = models.load_model('1.h5', compile=False)
model.compile(optimizer = optimizers.Adam(0.01), loss=losses.CategoricalCrossentropy())
print(model.predict_classes(x))

